﻿<Page x:Class="AzureDriverExplorer_Client.VHDUpload"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"        
         Height="auto" Width="auto"
	Title="Upload_">

    <Page.Resources>
        <!--Menu-->

        <!-- This style is used for buttons, to remove the WPF default 'animated' mouse over effect -->
        <Style x:Key="StyleCancelBotton" TargetType="Button">
            <Setter Property="OverridesDefaultStyle" Value="True"/>
            <Setter Property="Margin" Value="1"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Border Name="border" 
                            BorderThickness="1"                             
                            BorderBrush="Red" 
                            CornerRadius="3"
                           Background="#32E1DFCD">
                            <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter TargetName="border" Property="BorderBrush" Value="Black" />
                                <Setter TargetName="border" Property="Background" Value="#4BEA0000" />
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Page.Resources>

    <Grid x:Name="popupVhdUpload" Background="#7C000000" >
        <Grid HorizontalAlignment="Center" VerticalAlignment="Center">
            <Grid.RowDefinitions>
                <RowDefinition Height="20" />
                <RowDefinition Height="auto" />
            </Grid.RowDefinitions>
            <Grid Grid.Row="0"  Background="#FF929292">
                <Image HorizontalAlignment="Right" VerticalAlignment="Stretch"  Height="20" Width="20" Source="/AzureDriverExplorer_Client;component/Image/Cancel.png" />
                <Button x:Name="CloseWindows"  Height="20" Width="19" Style="{StaticResource StyleCancelBotton}"  HorizontalAlignment="Right" VerticalAlignment="Stretch" Click="Close_popupVhdUpload_Click" />
            </Grid>
            <Grid Background="White" Grid.Row="1"  Height="200" Width="385" HorizontalAlignment="Center" VerticalAlignment="Center" >
                <Grid.RowDefinitions >
                    <RowDefinition Height="30" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions >

                <Grid Grid.Row="0"   Background="#FFDEDEDE"  >
                    <TextBlock x:Name="Title_" Text="Update VHD" VerticalAlignment="Center" FontWeight="Bold" FontSize="14"></TextBlock>                    
                   
                </Grid >

                <Image  Name="BackgroundImageLocalList" Grid.Row="1"  Source="/AzureDriverExplorer_Client;component/Image/vhdUpload.png" OpacityMask="#3E000000" />
                <Grid Grid.Row="1">
                    <Grid.RowDefinitions >
                        <RowDefinition Height="0" />
                        <RowDefinition Height="*" />
                        <RowDefinition Height="*" />
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="5"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="5"/>
                        <RowDefinition Height="20" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="auto" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <TextBlock x:Name="AccountNameTitle" Grid.Column="0" Grid.Row="1"  VerticalAlignment="Center"  Text="Account Name" />
                    <TextBlock x:Name="AccountKeyTitle" Grid.Column="0" Grid.Row="2" VerticalAlignment="Center"  Text="Account Key" />
                    <TextBlock x:Name="ContainerNameTitle" Grid.Column="0" Grid.Row="3" VerticalAlignment="Center"  Text="Container Name" />

                    <TextBox x:Name="txtAccountName" Grid.Column="1" Grid.Row="1" Width="260" HorizontalAlignment="Left" BorderBrush="AliceBlue" Background="#85FFFFFF"></TextBox>
                    <Button x:Name="AddDataFile" Grid.Column="1" Grid.Row="1"  VerticalAlignment="Center" Width="20" HorizontalAlignment="Right" Click="popupGetDataFile_Click" >
                        <Image Source="/AzureDriverExplorer_Client;component/Image/Get_list.png" />
                    </Button>

                    <PasswordBox x:Name="txtAccountKey" Grid.Column="1" PasswordChar="*" Grid.Row="2" Width="280" HorizontalAlignment="Left" BorderBrush="AliceBlue" Background="#85FFFFFF"></PasswordBox>
                    <TextBox x:Name="txtContainerName" Grid.Column="1" Grid.Row="3" Width="280" HorizontalAlignment="Left" BorderBrush="AliceBlue" Background="#85FFFFFF"></TextBox>

                    <Button x:Name="txtFile" Grid.ColumnSpan="2" Content="Select File" Grid.Row="4" Background="#2F000000" Click="txtFile_Click"  BorderBrush="AliceBlue"></Button>
                    <Button  x:Name="Upload" Grid.ColumnSpan="2"  Content="Upload" Grid.Row="6" Click="Upload_Click"></Button>
                    <Grid x:Name="ProgressGrid" Grid.ColumnSpan="2" Grid.Row="8" Visibility="Hidden" Width="200">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"  />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <ProgressBar x:Name="ProgressUpload" Grid.Column="0"   Height="20"  OpacityMask="{x:Null}" BorderBrush="{Binding ColorFill}" Background="#E6E1DFCD"  />
                        <TextBlock x:Name="txtProgress"  Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Center"   />
                        <Image Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Stretch"  Height="20" Width="20" Source="/AzureDriverExplorer_Client;component/Image/Cancel.png" />
                        <Button Grid.Column="1"  Height="20" Width="19" Style="{StaticResource StyleCancelBotton}"  HorizontalAlignment="Right" VerticalAlignment="Stretch" Click="Cancel_Click" />
                    </Grid>
                </Grid>
            </Grid>

            <Grid x:Name="popupGetDataFile" Grid.Row="1" Background="White"  Visibility="Hidden">
                <Grid.RowDefinitions>
                    <RowDefinition Height="*" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <ListView Background="White"  Grid.Row="0" x:Name="ListConnection" SelectionMode="Single">
                    <ListView.View>
                        <GridView AllowsColumnReorder="true"  ColumnHeaderToolTip="InfoFile" >
                            <GridViewColumn Width="100" Header="Account Name" x:Name="AccountName" >
                                <GridViewColumn.CellTemplate>
                                    <DataTemplate >
                                        <Grid>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="Auto" />
                                            </Grid.ColumnDefinitions>
                                            <TextBlock Grid.Column="0" VerticalAlignment="Center"  Text="{Binding AccountName}"  />
                                            <TextBlock Grid.Column="0" VerticalAlignment="Center"  Text="{Binding AccountKey}" Visibility="Hidden" />
                                        </Grid>
                                    </DataTemplate>
                                </GridViewColumn.CellTemplate>

                            </GridViewColumn>

                            <GridViewColumn Width="130" Header="Container Name" x:Name="ContainerName" >
                                <GridViewColumn.CellTemplate>
                                    <DataTemplate >
                                        <Grid>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="Auto" />
                                            </Grid.ColumnDefinitions>
                                            <TextBlock Grid.Column="0" VerticalAlignment="Center"  Text="{Binding ContainerName}" />
                                        </Grid>
                                    </DataTemplate>
                                </GridViewColumn.CellTemplate>

                            </GridViewColumn>
                            <GridViewColumn Width="150" Header="VHD Name" x:Name="VHDName" >
                                <GridViewColumn.CellTemplate>
                                    <DataTemplate >
                                        <Grid>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="Auto" />
                                            </Grid.ColumnDefinitions>
                                            <TextBlock Grid.Column="0" VerticalAlignment="Center"  Text="{Binding VHDName}" />
                                        </Grid>
                                    </DataTemplate>
                                </GridViewColumn.CellTemplate>

                            </GridViewColumn>
                        </GridView>
                    </ListView.View>
                </ListView>
                <Grid Grid.Row="1" HorizontalAlignment="Center" >
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Button x:Name="Add" Content="Add" Width="70" Grid.Column="0" Click="Add_popupGetDataFile_Click"></Button>
                    <Button x:Name="CancelAdd" Content="Cancel" Width="70" Grid.Column="1" Click="Close_popupGetDataFile_Click"></Button>

                </Grid>
            </Grid>
        </Grid>
        
       
    </Grid>
</Page>
